package com.lsy.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lsy.dao.UserMapper;
import com.lsy.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目名：springboot02
 * 包名：com.lsy.service
 * 类名：PlayerService
 * 描述：
 * 作者：柳胜酉
 * 开始时间：2023/6/23
 * 完成时间：
 * 版本：1.0
 */
@Service
public class PlayerService {
    @Autowired
    private UserMapper userMapper;

    public List<User> getAllPlayers() {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("role_id", 3);
        return userMapper.selectList(queryWrapper);
    }
}
